<script>
export default {
  name: 'ShowIndexRange',
  render: function (h) {
    const min = this.rangerInfo.min
    const max = this.rangerInfo.max
    let slots = this.$slots.default || []
    slots = slots.filter(d => {
      const showIndex = d.data.attrs['show-index'] >= 0 ? d.data.attrs['show-index'] : Infinity
      const needFilter = d.data.attrs['need-filter']
      if (needFilter) {
        return min <= showIndex && showIndex <= max
      }
      return true
    })
    return h(
      'div', {}, slots
    )
  },
  inject: ['rangerInfo'],
  data () {
    return {}
  },
  props: {
    tree: Object
  },
  watch: {
  },
  methods: {
  }
}
</script>

<style scoped>

</style>
